package com.ycp.erp.warehouse.presenter;

import android.content.Context;

import com.one.common.presenter.BaseApiPresenter;
import com.one.common.view.base.BaseActivity;
import com.one.common.view.base.IListView;
import com.ycp.erp.warehouse.model.ProcureWarehouseModel;
import com.ycp.erp.warehouse.model.bean.Warehouse;
import com.ycp.erp.warehouse.model.bean.ProcurementWarehouse;

import java.util.ArrayList;

/**
 * Class Des:
 * Created by bjh on 2021/8/24.
 */
public class WarehousePresenter extends BaseApiPresenter<IListView, ProcureWarehouseModel> {
    public WarehousePresenter(IListView mView, Context mContext) {
        super((IListView) mView, mContext, new ProcureWarehouseModel((BaseActivity) mContext));
    }
    public void getProcurementWarehouses(){
        ArrayList<ProcurementWarehouse> procurementWarehouses = new ArrayList<>();
        ProcurementWarehouse procurementWarehouse = new ProcurementWarehouse();
        procurementWarehouse.setGoodsName("测试");
        procurementWarehouse.setGoodsDesc("测试描述");
        procurementWarehouse.setGoodsNum(0);
        procurementWarehouse.setGoodsPrice("100");
        procurementWarehouses.add(procurementWarehouse);
        ProcurementWarehouse procurementWarehouse1 = new ProcurementWarehouse();
        procurementWarehouse1.setGoodsName("测试");
        procurementWarehouse1.setGoodsDesc("测试描述");
        procurementWarehouse1.setGoodsNum(0);
        procurementWarehouse1.setGoodsPrice("100");
        procurementWarehouses.add(procurementWarehouse1);
        ProcurementWarehouse procurementWarehouse2 = new ProcurementWarehouse();
        procurementWarehouse2.setGoodsName("测试");
        procurementWarehouse2.setGoodsDesc("测试描述");
        procurementWarehouse2.setGoodsNum(0);
        procurementWarehouse2.setGoodsPrice("100");
        procurementWarehouses.add(procurementWarehouse2);
        mView.loadSuccess(procurementWarehouses);
    }
    public void getOutWarehouses(){
        ArrayList<Warehouse> outWarehouses = new ArrayList<>();
        Warehouse outWarehouse = new Warehouse();
        outWarehouse.setGoodsName("测试");
        outWarehouse.setGoodsDesc("测试描述");
        outWarehouse.setGoodsTotalNum(18);
        outWarehouse.setGoodsPrice("100");
        outWarehouses.add(outWarehouse);
        Warehouse outWarehouse1 = new Warehouse();
        outWarehouse1.setGoodsName("测试1");
        outWarehouse1.setGoodsDesc("测试描述");
        outWarehouse1.setGoodsTotalNum(4);
        outWarehouse1.setGoodsPrice("100");
        outWarehouses.add(outWarehouse1);
        Warehouse outWarehouse2 = new Warehouse();
        outWarehouse2.setGoodsName("测试2");
        outWarehouse2.setGoodsDesc("测试描述2");
        outWarehouse2.setGoodsTotalNum(8);
        outWarehouse2.setGoodsPrice("100");
        outWarehouses.add(outWarehouse2);
        mView.loadSuccess(outWarehouses);
    }
    public void getWarehouses(){
        ArrayList<Warehouse> outWarehouses = new ArrayList<>();
        Warehouse outWarehouse = new Warehouse();
        outWarehouse.setGoodsName("测试");
        outWarehouse.setGoodsDesc("测试描述");
        outWarehouse.setGoodsTotalNum(18);
        outWarehouse.setGoodsPrice("100");
        outWarehouse.setWarehouseName("库房1");
        outWarehouses.add(outWarehouse);
        Warehouse outWarehouse1 = new Warehouse();
        outWarehouse1.setGoodsName("测试1");
        outWarehouse1.setGoodsDesc("测试描述");
        outWarehouse1.setGoodsTotalNum(4);
        outWarehouse1.setGoodsPrice("100");
        outWarehouse1.setWarehouseName("库房2");
        outWarehouses.add(outWarehouse1);
        Warehouse outWarehouse2 = new Warehouse();
        outWarehouse2.setGoodsName("测试2");
        outWarehouse2.setGoodsDesc("测试描述2");
        outWarehouse2.setGoodsTotalNum(8);
        outWarehouse2.setGoodsPrice("100");
        outWarehouse2.setWarehouseName("库房3");
        outWarehouses.add(outWarehouse2);
        Warehouse outWarehouse3 = new Warehouse();
        outWarehouse3.setGoodsName("测试2");
        outWarehouse3.setGoodsDesc("测试描述2");
        outWarehouse3.setGoodsTotalNum(8);
        outWarehouse3.setGoodsPrice("100");
        outWarehouse3.setWarehouseName("库房4");
        outWarehouses.add(outWarehouse3);
        Warehouse outWarehouse4 = new Warehouse();
        outWarehouse4.setGoodsName("测试2");
        outWarehouse4.setGoodsDesc("测试描述2");
        outWarehouse4.setGoodsTotalNum(8);
        outWarehouse4.setGoodsPrice("100");
        outWarehouse4.setWarehouseName("库房5");
        outWarehouses.add(outWarehouse4);
        Warehouse outWarehouse5 = new Warehouse();
        outWarehouse5.setGoodsName("测试2");
        outWarehouse5.setGoodsDesc("测试描述2");
        outWarehouse5.setGoodsTotalNum(8);
        outWarehouse5.setGoodsPrice("100");
        outWarehouse5.setWarehouseName("库房6");
        outWarehouses.add(outWarehouse5);
        mView.loadSuccess(outWarehouses);
    }
}
